import { url } from '@/config';
import request from '../axios'
// 项目list
export const projectList = (params) => request({
  url: url + '/project',
  method: 'get',
  params
})

export const addProject =(data) => request({
  url: url +'/project',
  method: 'post',
  data
})

export const updateProject =(id,data) => request({
  url: url +'/project/'+id,
  method: 'put',
  data
})
export const deleteProject =(id) => request({
  url: url +'/project/'+id,
  method: 'delete'
})

export const getProjectMembers = (projectId) => request({
  url: url +'/project/members',
  method: 'get',
  params:{
    projectId
  }
})
export const  saveOrUpdateMember =(data) => request({
  url: url +'/project/members',
  method: 'post',
  data
})
export const  removeMember =(id) => request({
  url: url +'/project/members/'+id,
  method: 'delete'
})